<template>
  <div>
      <h2>用户注册</h2>
      <button @click='toLogin()'>注册</button>
  </div>
</template>

<script>
export default {
    methods:{
        toLogin(){
            alert('注册成功！去登录！');
            // this.$router.push('/login');
            this.$router.push({path:'/login'});
            // this.$router.push({name:'Login'});
        }
    }
}
</script>

<style>

</style>